package icu.ikuns.officer;

import icu.ikuns.abst.Mission;
import icu.ikuns.abst.Officer;

/**
 * @Author： Kimariyb
 * @Date：2022/05/26/14:10
 * @Description：
 */
public class PaiZhang extends Officer {
    public PaiZhang(String name) {
        super(name);
    }

    @Override
    public void handleMission(Mission mission) {
        if (mission.getEnemyNumber() >= 10 && mission.getEnemyNumber() < 50) {
            System.out.println("排长" + name + "接到" + mission.getSoldierName() + "的军情" +
                    "，敌人数量为" + mission.getEnemyNumber());
        } else {
            if (this.successor != null) {
                this.successor.handleMission(mission);
            }
        }
    }
}
